﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using WebReference;


public partial class Admin_Previous_Pages_PreChrComposition : System.Web.UI.Page
{
    Service objService = new Service();

    protected void Page_Load(object sender, EventArgs e)
    {
        bindDataGrid();
    }
    private void bindDataGrid()
    {
        DataSet ds = new DataSet();
        ds = objService.RunSQLQuery("select c.id,c.C,c.H,c.N,c.S,c.Ash,ex.ExperimentName from chrcomp as c,experiment ex where c.experiment_id=ex.experiment_id");
        dgCHR.DataSource = ds;
        dgCHR.DataBind();
    }
    protected void dgCHR_PageIndexChanging(object sender, GridViewPageEventArgs e)
    {
        dgCHR.PageIndex = e.NewPageIndex;
        bindDataGrid();
    }
}
